;solution for euler 9

;slow
(defun euler9-calc ()
	(loop for a from 0 to 1000 do
	(loop for b from (+ a 1) to (- 1000 a) do
	(loop for c from (+ b 1) to (- 1000 a b) do
		(if (= (+ a b c) 1000)
			(if (= (* c c) (+ (* a a) (* b b)))
				(return-from euler9-calc (* a b c))))))))

(defun solve-euler9 ()
	(format t "Euler 9: ~a" (euler9-calc)))
			